/*
 * JanelaLocadoraView.java
 */

package View;

import Model.Aluguel;
import Model.Ator;
import Model.Cliente;
import Model.Filme;
import Model.Locadora;
import org.jdesktop.application.Action;
import org.jdesktop.application.ResourceMap;
import org.jdesktop.application.SingleFrameApplication;
import org.jdesktop.application.FrameView;
import org.jdesktop.application.TaskMonitor;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.Iterator;
import javax.swing.Timer;
import javax.swing.Icon;
import javax.swing.JDialog;
import javax.swing.JFrame;
import javax.swing.JTable;
import javax.swing.event.ListSelectionEvent;
import javax.swing.event.ListSelectionListener;

/**
 * The application's main frame.
 */
public class JanelaLocadoraView extends FrameView {

    Locadora locadora;
    HashMap<Integer,Filme> filmesHashResultado;
    HashMap<Integer,Cliente> clientesHashResultado;
    HashMap<Integer,Aluguel> alugueisHashResultado;

    public JanelaLocadoraView(SingleFrameApplication app,Locadora locadora) {
        super(app);

        this.locadora = locadora;

        initComponents();

        // status bar initialization - message timeout, idle icon and busy animation, etc
        ResourceMap resourceMap = getResourceMap();
        int messageTimeout = resourceMap.getInteger("StatusBar.messageTimeout");
        messageTimer = new Timer(messageTimeout, new ActionListener() {
            public void actionPerformed(ActionEvent e) {
                statusMessageLabel.setText("");
            }
        });
        messageTimer.setRepeats(false);
        int busyAnimationRate = resourceMap.getInteger("StatusBar.busyAnimationRate");
        for (int i = 0; i < busyIcons.length; i++) {
            busyIcons[i] = resourceMap.getIcon("StatusBar.busyIcons[" + i + "]");
        }
        busyIconTimer = new Timer(busyAnimationRate, new ActionListener() {
            public void actionPerformed(ActionEvent e) {
                busyIconIndex = (busyIconIndex + 1) % busyIcons.length;
                statusAnimationLabel.setIcon(busyIcons[busyIconIndex]);
            }
        });
        idleIcon = resourceMap.getIcon("StatusBar.idleIcon");
        statusAnimationLabel.setIcon(idleIcon);
        progressBar.setVisible(false);

        // connecting action tasks to status bar via TaskMonitor
        TaskMonitor taskMonitor = new TaskMonitor(getApplication().getContext());
        taskMonitor.addPropertyChangeListener(new java.beans.PropertyChangeListener() {
            public void propertyChange(java.beans.PropertyChangeEvent evt) {
                String propertyName = evt.getPropertyName();
                if ("started".equals(propertyName)) {
                    if (!busyIconTimer.isRunning()) {
                        statusAnimationLabel.setIcon(busyIcons[0]);
                        busyIconIndex = 0;
                        busyIconTimer.start();
                    }
                    progressBar.setVisible(true);
                    progressBar.setIndeterminate(true);
                } else if ("done".equals(propertyName)) {
                    busyIconTimer.stop();
                    statusAnimationLabel.setIcon(idleIcon);
                    progressBar.setVisible(false);
                    progressBar.setValue(0);
                } else if ("message".equals(propertyName)) {
                    String text = (String)(evt.getNewValue());
                    statusMessageLabel.setText((text == null) ? "" : text);
                    messageTimer.restart();
                } else if ("progress".equals(propertyName)) {
                    int value = (Integer)(evt.getNewValue());
                    progressBar.setVisible(true);
                    progressBar.setIndeterminate(false);
                    progressBar.setValue(value);
                }
            }
        });

        resultadoTabelaFilmeJTable.getSelectionModel().addListSelectionListener( new RowListenerFilmes() );
        resultadoTabelaClienteJTable.getSelectionModel().addListSelectionListener( new RowListenerClientes() );
        resultadoTabelaAluguelJTable.getSelectionModel().addListSelectionListener( new RowListenerAlugueis() );
    }

    @Action
    public void showAboutBox() {
        if (aboutBox == null) {
            JFrame mainFrame = JanelaLocadoraApp.getApplication().getMainFrame();
            aboutBox = new JanelaLocadoraAboutBox(mainFrame);
            aboutBox.setLocationRelativeTo(mainFrame);
        }
        JanelaLocadoraApp.getApplication().show(aboutBox);
    }

    /** This method is called from within the constructor to
     * initialize the form.
     * WARNING: Do NOT modify this code. The content of this method is
     * always regenerated by the Form Editor.
     */
    @SuppressWarnings("unchecked")
    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
    private void initComponents() {

        mainPanel = new javax.swing.JPanel();
        geraljTabbedPane = new javax.swing.JTabbedPane();
        filmesJPanel = new javax.swing.JPanel();
        formFilmesJPanel = new javax.swing.JPanel();
        consultarFilmeJButton = new javax.swing.JButton();
        salvarFilmeJButton = new javax.swing.JButton();
        limparFormConsultaFilmeJButton = new javax.swing.JButton();
        jLabel1 = new javax.swing.JLabel();
        nomeJTextField = new javax.swing.JTextField();
        jLabel2 = new javax.swing.JLabel();
        nomeOriginalJTextField = new javax.swing.JTextField();
        jLabel3 = new javax.swing.JLabel();
        jLabel4 = new javax.swing.JLabel();
        anoJTextField = new javax.swing.JTextField();
        duracaoJTextField = new javax.swing.JTextField();
        jLabel5 = new javax.swing.JLabel();
        quantidadeJTextField = new javax.swing.JTextField();
        jPanel5 = new javax.swing.JPanel();
        inglesJRadioButton = new javax.swing.JRadioButton();
        espanholJRadioButton = new javax.swing.JRadioButton();
        portuguesJRadioButton = new javax.swing.JRadioButton();
        outroJRadioButton = new javax.swing.JRadioButton();
        jPanel6 = new javax.swing.JPanel();
        legendaInglesJCheckBox = new javax.swing.JCheckBox();
        legendaEspanholJCheckBox = new javax.swing.JCheckBox();
        legendaPortuguesJCheckBox = new javax.swing.JCheckBox();
        legendaOutraJCheckBox = new javax.swing.JCheckBox();
        jPanel7 = new javax.swing.JPanel();
        generoAcaoJCheckBox = new javax.swing.JCheckBox();
        generoDramaJCheckBox = new javax.swing.JCheckBox();
        generoFiccaoJCheckBox = new javax.swing.JCheckBox();
        generoAventuraJCheckBox = new javax.swing.JCheckBox();
        generoSuspenseJCheckBox = new javax.swing.JCheckBox();
        generoRomanceJCheckBox = new javax.swing.JCheckBox();
        generoComediaJCheckBox = new javax.swing.JCheckBox();
        generoTerrorJCheckBox = new javax.swing.JCheckBox();
        atoresJTabbedPane = new javax.swing.JTabbedPane();
        jPanel4 = new javax.swing.JPanel();
        jLabel10 = new javax.swing.JLabel();
        nomeAtor1JTextField = new javax.swing.JTextField();
        jLabel11 = new javax.swing.JLabel();
        papel1Ator1JTextField = new javax.swing.JTextField();
        jLabel12 = new javax.swing.JLabel();
        papel2Ator1JTextField = new javax.swing.JTextField();
        jLabel13 = new javax.swing.JLabel();
        papel3Ator1JTextField = new javax.swing.JTextField();
        jPanel2 = new javax.swing.JPanel();
        jLabel14 = new javax.swing.JLabel();
        nomeAtor2JTextField = new javax.swing.JTextField();
        jLabel15 = new javax.swing.JLabel();
        papel1Ator2JTextField = new javax.swing.JTextField();
        jLabel16 = new javax.swing.JLabel();
        papel2Ator2JTextField = new javax.swing.JTextField();
        jLabel17 = new javax.swing.JLabel();
        papel3Ator2JTextField = new javax.swing.JTextField();
        jPanel3 = new javax.swing.JPanel();
        jLabel18 = new javax.swing.JLabel();
        nomeAtor3JTextField = new javax.swing.JTextField();
        jLabel19 = new javax.swing.JLabel();
        papel1Ator3JTextField = new javax.swing.JTextField();
        jLabel20 = new javax.swing.JLabel();
        papel2Ator3JTextField = new javax.swing.JTextField();
        jLabel21 = new javax.swing.JLabel();
        papel3Ator3JTextField = new javax.swing.JTextField();
        jPanel1 = new javax.swing.JPanel();
        jLabel6 = new javax.swing.JLabel();
        nomeAtor4JTextField = new javax.swing.JTextField();
        jLabel7 = new javax.swing.JLabel();
        papel1Ator4JTextField = new javax.swing.JTextField();
        jLabel8 = new javax.swing.JLabel();
        papel2Ator4JTextField = new javax.swing.JTextField();
        jLabel9 = new javax.swing.JLabel();
        papel3Ator4JTextField = new javax.swing.JTextField();
        jLabel37 = new javax.swing.JLabel();
        idFilmeJTextField = new javax.swing.JTextField();
        resultadoConsultaFilmeJPanel = new javax.swing.JPanel();
        jScrollPane1 = new javax.swing.JScrollPane();
        resultadoTabelaFilmeJTable = new javax.swing.JTable();
        excluirFilmesJButton = new javax.swing.JButton();
        clientesJPanel = new javax.swing.JPanel();
        formClientesJPanel = new javax.swing.JPanel();
        jLabel22 = new javax.swing.JLabel();
        nomeClienteJTextField = new javax.swing.JTextField();
        jLabel23 = new javax.swing.JLabel();
        jLabel24 = new javax.swing.JLabel();
        telefoneClienteJTextField = new javax.swing.JTextField();
        jLabel25 = new javax.swing.JLabel();
        nascimentoClienteJTextField = new javax.swing.JTextField();
        cpfClienteJTextField = new javax.swing.JTextField();
        jLabel26 = new javax.swing.JLabel();
        enderecoClienteJTextField = new javax.swing.JTextField();
        jLabel27 = new javax.swing.JLabel();
        cepClienteJTextField = new javax.swing.JTextField();
        jLabel28 = new javax.swing.JLabel();
        cidadeClienteJTextField = new javax.swing.JTextField();
        jLabel29 = new javax.swing.JLabel();
        bairroClienteJTextField = new javax.swing.JTextField();
        titularClienteJCheckBox = new javax.swing.JCheckBox();
        consultaClienteJButton = new javax.swing.JButton();
        limparFormConsultaClienteJButton = new javax.swing.JButton();
        salvarClienteJButton = new javax.swing.JButton();
        jLabel38 = new javax.swing.JLabel();
        idClienteJTextField = new javax.swing.JTextField();
        resultadoConsultaClientesJPanel = new javax.swing.JPanel();
        jScrollPane2 = new javax.swing.JScrollPane();
        resultadoTabelaClienteJTable = new javax.swing.JTable();
        excluirClientesJButton = new javax.swing.JButton();
        alugueisJPanel = new javax.swing.JPanel();
        formAlugueisJPanel = new javax.swing.JPanel();
        jLabel30 = new javax.swing.JLabel();
        codigoClienteAluguelJTextField = new javax.swing.JTextField();
        jLabel32 = new javax.swing.JLabel();
        idFilmeAluguelJTextField = new javax.swing.JTextField();
        consultaAluguelButton = new javax.swing.JButton();
        jLabel34 = new javax.swing.JLabel();
        dataAluguelJTextField = new javax.swing.JTextField();
        jLabel35 = new javax.swing.JLabel();
        dataDevolucaoJTextField = new javax.swing.JTextField();
        salvarAluguelJButton = new javax.swing.JButton();
        jLabel31 = new javax.swing.JLabel();
        codigoCopiaFilmeJTextField = new javax.swing.JTextField();
        jPanel8 = new javax.swing.JPanel();
        jScrollPane3 = new javax.swing.JScrollPane();
        resultadoTabelaAluguelJTable = new javax.swing.JTable();
        jLabel36 = new javax.swing.JLabel();
        encerrarAlugueisJButton = new javax.swing.JButton();
        menuBar = new javax.swing.JMenuBar();
        javax.swing.JMenu fileMenu = new javax.swing.JMenu();
        javax.swing.JMenuItem exitMenuItem = new javax.swing.JMenuItem();
        jMenu1 = new javax.swing.JMenu();
        jMenuItem1 = new javax.swing.JMenuItem();
        javax.swing.JMenu helpMenu = new javax.swing.JMenu();
        javax.swing.JMenuItem aboutMenuItem = new javax.swing.JMenuItem();
        statusPanel = new javax.swing.JPanel();
        javax.swing.JSeparator statusPanelSeparator = new javax.swing.JSeparator();
        statusMessageLabel = new javax.swing.JLabel();
        statusAnimationLabel = new javax.swing.JLabel();
        progressBar = new javax.swing.JProgressBar();
        idiomaButtonGroup = new javax.swing.ButtonGroup();

        mainPanel.setName("mainPanel"); // NOI18N

        geraljTabbedPane.setName("geraljTabbedPane"); // NOI18N

        filmesJPanel.setName("filmesJPanel"); // NOI18N

        org.jdesktop.application.ResourceMap resourceMap = org.jdesktop.application.Application.getInstance(View.JanelaLocadoraApp.class).getContext().getResourceMap(JanelaLocadoraView.class);
        formFilmesJPanel.setBorder(javax.swing.BorderFactory.createTitledBorder(null, resourceMap.getString("formFilmesJPanel.border.title"), javax.swing.border.TitledBorder.DEFAULT_JUSTIFICATION, javax.swing.border.TitledBorder.DEFAULT_POSITION, new java.awt.Font("Tahoma", 0, 11), resourceMap.getColor("formFilmesJPanel.border.titleColor"))); // NOI18N
        formFilmesJPanel.setName("formFilmesJPanel"); // NOI18N

        consultarFilmeJButton.setText(resourceMap.getString("consultarFilmeJButton.text")); // NOI18N
        consultarFilmeJButton.setName("consultarFilmeJButton"); // NOI18N
        consultarFilmeJButton.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                consultarFilmeJButtonActionPerformed(evt);
            }
        });

        salvarFilmeJButton.setText(resourceMap.getString("salvarFilmeJButton.text")); // NOI18N
        salvarFilmeJButton.setName("salvarFilmeJButton"); // NOI18N
        salvarFilmeJButton.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                salvarFilmeJButtonActionPerformed(evt);
            }
        });

        limparFormConsultaFilmeJButton.setText(resourceMap.getString("limparFormConsultaFilmeJButton.text")); // NOI18N
        limparFormConsultaFilmeJButton.setName("limparFormConsultaFilmeJButton"); // NOI18N
        limparFormConsultaFilmeJButton.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                limparFormConsultaFilmeJButtonActionPerformed(evt);
            }
        });

        jLabel1.setText(resourceMap.getString("jLabel1.text")); // NOI18N
        jLabel1.setName("jLabel1"); // NOI18N

        nomeJTextField.setText(resourceMap.getString("nomeJTextField.text")); // NOI18N
        nomeJTextField.setName("nomeJTextField"); // NOI18N

        jLabel2.setText(resourceMap.getString("jLabel2.text")); // NOI18N
        jLabel2.setName("jLabel2"); // NOI18N

        nomeOriginalJTextField.setText(resourceMap.getString("nomeOriginalJTextField.text")); // NOI18N
        nomeOriginalJTextField.setName("nomeOriginalJTextField"); // NOI18N

        jLabel3.setText(resourceMap.getString("jLabel3.text")); // NOI18N
        jLabel3.setName("jLabel3"); // NOI18N

        jLabel4.setText(resourceMap.getString("jLabel4.text")); // NOI18N
        jLabel4.setName("jLabel4"); // NOI18N

        anoJTextField.setText(resourceMap.getString("anoJTextField.text")); // NOI18N
        anoJTextField.setName("anoJTextField"); // NOI18N

        duracaoJTextField.setText(resourceMap.getString("duracaoJTextField.text")); // NOI18N
        duracaoJTextField.setName("duracaoJTextField"); // NOI18N

        jLabel5.setText(resourceMap.getString("jLabel5.text")); // NOI18N
        jLabel5.setName("jLabel5"); // NOI18N

        quantidadeJTextField.setText(resourceMap.getString("quantidadeJTextField.text")); // NOI18N
        quantidadeJTextField.setName("quantidadeJTextField"); // NOI18N

        jPanel5.setBorder(javax.swing.BorderFactory.createTitledBorder(null, resourceMap.getString("jPanel5.border.title"), javax.swing.border.TitledBorder.DEFAULT_JUSTIFICATION, javax.swing.border.TitledBorder.DEFAULT_POSITION, new java.awt.Font("Tahoma", 0, 11), resourceMap.getColor("jPanel5.border.titleColor"))); // NOI18N
        jPanel5.setName("jPanel5"); // NOI18N

        inglesJRadioButton.setText(resourceMap.getString("inglesJRadioButton.text")); // NOI18N
        inglesJRadioButton.setName("inglesJRadioButton"); // NOI18N

        espanholJRadioButton.setText(resourceMap.getString("espanholJRadioButton.text")); // NOI18N
        espanholJRadioButton.setName("espanholJRadioButton"); // NOI18N

        portuguesJRadioButton.setText(resourceMap.getString("portuguesJRadioButton.text")); // NOI18N
        portuguesJRadioButton.setName("portuguesJRadioButton"); // NOI18N

        outroJRadioButton.setText(resourceMap.getString("outroJRadioButton.text")); // NOI18N
        outroJRadioButton.setName("outroJRadioButton"); // NOI18N

        javax.swing.GroupLayout jPanel5Layout = new javax.swing.GroupLayout(jPanel5);
        jPanel5.setLayout(jPanel5Layout);
        jPanel5Layout.setHorizontalGroup(
            jPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel5Layout.createSequentialGroup()
                .addGroup(jPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(inglesJRadioButton)
                    .addComponent(espanholJRadioButton)
                    .addComponent(portuguesJRadioButton)
                    .addComponent(outroJRadioButton))
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
        );
        jPanel5Layout.setVerticalGroup(
            jPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel5Layout.createSequentialGroup()
                .addComponent(inglesJRadioButton)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(espanholJRadioButton)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(portuguesJRadioButton)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(outroJRadioButton)
                .addContainerGap(15, Short.MAX_VALUE))
        );

        jPanel6.setBorder(javax.swing.BorderFactory.createTitledBorder(null, resourceMap.getString("jPanel6.border.title"), javax.swing.border.TitledBorder.DEFAULT_JUSTIFICATION, javax.swing.border.TitledBorder.DEFAULT_POSITION, new java.awt.Font("Tahoma", 0, 11), resourceMap.getColor("jPanel6.border.titleColor"))); // NOI18N
        jPanel6.setName("jPanel6"); // NOI18N

        legendaInglesJCheckBox.setText(resourceMap.getString("legendaInglesJCheckBox.text")); // NOI18N
        legendaInglesJCheckBox.setName("legendaInglesJCheckBox"); // NOI18N

        legendaEspanholJCheckBox.setText(resourceMap.getString("legendaEspanholJCheckBox.text")); // NOI18N
        legendaEspanholJCheckBox.setName("legendaEspanholJCheckBox"); // NOI18N

        legendaPortuguesJCheckBox.setText(resourceMap.getString("legendaPortuguesJCheckBox.text")); // NOI18N
        legendaPortuguesJCheckBox.setName("legendaPortuguesJCheckBox"); // NOI18N

        legendaOutraJCheckBox.setText(resourceMap.getString("legendaOutraJCheckBox.text")); // NOI18N
        legendaOutraJCheckBox.setName("legendaOutraJCheckBox"); // NOI18N

        javax.swing.GroupLayout jPanel6Layout = new javax.swing.GroupLayout(jPanel6);
        jPanel6.setLayout(jPanel6Layout);
        jPanel6Layout.setHorizontalGroup(
            jPanel6Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addComponent(legendaInglesJCheckBox)
            .addComponent(legendaEspanholJCheckBox)
            .addComponent(legendaPortuguesJCheckBox)
            .addComponent(legendaOutraJCheckBox)
        );
        jPanel6Layout.setVerticalGroup(
            jPanel6Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel6Layout.createSequentialGroup()
                .addComponent(legendaInglesJCheckBox)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(legendaEspanholJCheckBox)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(legendaPortuguesJCheckBox)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(legendaOutraJCheckBox)
                .addContainerGap(15, Short.MAX_VALUE))
        );

        jPanel7.setBorder(javax.swing.BorderFactory.createTitledBorder(null, resourceMap.getString("jPanel7.border.title"), javax.swing.border.TitledBorder.DEFAULT_JUSTIFICATION, javax.swing.border.TitledBorder.DEFAULT_POSITION, new java.awt.Font("Tahoma", 0, 11), resourceMap.getColor("jPanel7.border.titleColor"))); // NOI18N
        jPanel7.setName("jPanel7"); // NOI18N

        generoAcaoJCheckBox.setText(resourceMap.getString("generoAcaoJCheckBox.text")); // NOI18N
        generoAcaoJCheckBox.setName("generoAcaoJCheckBox"); // NOI18N

        generoDramaJCheckBox.setText(resourceMap.getString("generoDramaJCheckBox.text")); // NOI18N
        generoDramaJCheckBox.setName("generoDramaJCheckBox"); // NOI18N

        generoFiccaoJCheckBox.setText(resourceMap.getString("generoFiccaoJCheckBox.text")); // NOI18N
        generoFiccaoJCheckBox.setName("generoFiccaoJCheckBox"); // NOI18N

        generoAventuraJCheckBox.setText(resourceMap.getString("generoAventuraJCheckBox.text")); // NOI18N
        generoAventuraJCheckBox.setName("generoAventuraJCheckBox"); // NOI18N

        generoSuspenseJCheckBox.setText(resourceMap.getString("generoSuspenseJCheckBox.text")); // NOI18N
        generoSuspenseJCheckBox.setName("generoSuspenseJCheckBox"); // NOI18N

        generoRomanceJCheckBox.setText(resourceMap.getString("generoRomanceJCheckBox.text")); // NOI18N
        generoRomanceJCheckBox.setName("generoRomanceJCheckBox"); // NOI18N

        generoComediaJCheckBox.setText(resourceMap.getString("generoComediaJCheckBox.text")); // NOI18N
        generoComediaJCheckBox.setName("generoComediaJCheckBox"); // NOI18N

        generoTerrorJCheckBox.setText(resourceMap.getString("generoTerrorJCheckBox.text")); // NOI18N
        generoTerrorJCheckBox.setName("generoTerrorJCheckBox"); // NOI18N

        javax.swing.GroupLayout jPanel7Layout = new javax.swing.GroupLayout(jPanel7);
        jPanel7.setLayout(jPanel7Layout);
        jPanel7Layout.setHorizontalGroup(
            jPanel7Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel7Layout.createSequentialGroup()
                .addGroup(jPanel7Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(generoFiccaoJCheckBox)
                    .addComponent(generoDramaJCheckBox)
                    .addComponent(generoAcaoJCheckBox)
                    .addComponent(generoAventuraJCheckBox))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(jPanel7Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(generoTerrorJCheckBox)
                    .addComponent(generoComediaJCheckBox)
                    .addComponent(generoRomanceJCheckBox)
                    .addComponent(generoSuspenseJCheckBox))
                .addContainerGap(8, Short.MAX_VALUE))
        );
        jPanel7Layout.setVerticalGroup(
            jPanel7Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel7Layout.createSequentialGroup()
                .addGroup(jPanel7Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(generoAcaoJCheckBox)
                    .addComponent(generoComediaJCheckBox))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(jPanel7Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(generoDramaJCheckBox)
                    .addComponent(generoRomanceJCheckBox))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(jPanel7Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(generoFiccaoJCheckBox)
                    .addComponent(generoSuspenseJCheckBox))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(jPanel7Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(generoAventuraJCheckBox)
                    .addComponent(generoTerrorJCheckBox)))
        );

        atoresJTabbedPane.setBackground(resourceMap.getColor("atoresJTabbedPane.background")); // NOI18N
        atoresJTabbedPane.setName("atoresJTabbedPane"); // NOI18N

        jPanel4.setName("jPanel4"); // NOI18N

        jLabel10.setText(resourceMap.getString("jLabel10.text")); // NOI18N
        jLabel10.setName("jLabel10"); // NOI18N

        nomeAtor1JTextField.setName("nomeAtor1JTextField"); // NOI18N

        jLabel11.setText(resourceMap.getString("jLabel11.text")); // NOI18N
        jLabel11.setName("jLabel11"); // NOI18N

        papel1Ator1JTextField.setName("papel1Ator1JTextField"); // NOI18N

        jLabel12.setText(resourceMap.getString("jLabel12.text")); // NOI18N
        jLabel12.setName("jLabel12"); // NOI18N

        papel2Ator1JTextField.setName("papel2Ator1JTextField"); // NOI18N

        jLabel13.setText(resourceMap.getString("jLabel13.text")); // NOI18N
        jLabel13.setName("jLabel13"); // NOI18N

        papel3Ator1JTextField.setName("papel3Ator1JTextField"); // NOI18N

        javax.swing.GroupLayout jPanel4Layout = new javax.swing.GroupLayout(jPanel4);
        jPanel4.setLayout(jPanel4Layout);
        jPanel4Layout.setHorizontalGroup(
            jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel4Layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(jPanel4Layout.createSequentialGroup()
                        .addComponent(jLabel12)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(papel2Ator1JTextField, javax.swing.GroupLayout.DEFAULT_SIZE, 193, Short.MAX_VALUE))
                    .addGroup(jPanel4Layout.createSequentialGroup()
                        .addComponent(jLabel13)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(papel3Ator1JTextField, javax.swing.GroupLayout.DEFAULT_SIZE, 193, Short.MAX_VALUE))
                    .addGroup(jPanel4Layout.createSequentialGroup()
                        .addGroup(jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(jLabel11)
                            .addComponent(jLabel10))
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addGroup(jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(nomeAtor1JTextField, javax.swing.GroupLayout.DEFAULT_SIZE, 193, Short.MAX_VALUE)
                            .addComponent(papel1Ator1JTextField, javax.swing.GroupLayout.DEFAULT_SIZE, 193, Short.MAX_VALUE))))
                .addContainerGap())
        );
        jPanel4Layout.setVerticalGroup(
            jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel4Layout.createSequentialGroup()
                .addGroup(jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel10)
                    .addComponent(nomeAtor1JTextField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel11)
                    .addComponent(papel1Ator1JTextField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel12)
                    .addComponent(papel2Ator1JTextField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel13)
                    .addComponent(papel3Ator1JTextField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
        );

        atoresJTabbedPane.addTab(resourceMap.getString("jPanel4.TabConstraints.tabTitle"), jPanel4); // NOI18N

        jPanel2.setName("jPanel2"); // NOI18N

        jLabel14.setText(resourceMap.getString("jLabel14.text")); // NOI18N
        jLabel14.setName("jLabel14"); // NOI18N

        nomeAtor2JTextField.setName("nomeAtor2JTextField"); // NOI18N

        jLabel15.setText(resourceMap.getString("jLabel15.text")); // NOI18N
        jLabel15.setName("jLabel15"); // NOI18N

        papel1Ator2JTextField.setName("papel1Ator2JTextField"); // NOI18N

        jLabel16.setText(resourceMap.getString("jLabel16.text")); // NOI18N
        jLabel16.setName("jLabel16"); // NOI18N

        papel2Ator2JTextField.setName("papel2Ator2JTextField"); // NOI18N

        jLabel17.setText(resourceMap.getString("jLabel17.text")); // NOI18N
        jLabel17.setName("jLabel17"); // NOI18N

        papel3Ator2JTextField.setName("papel3Ator2JTextField"); // NOI18N

        javax.swing.GroupLayout jPanel2Layout = new javax.swing.GroupLayout(jPanel2);
        jPanel2.setLayout(jPanel2Layout);
        jPanel2Layout.setHorizontalGroup(
            jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel2Layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(jPanel2Layout.createSequentialGroup()
                        .addComponent(jLabel16)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(papel2Ator2JTextField, javax.swing.GroupLayout.DEFAULT_SIZE, 193, Short.MAX_VALUE))
                    .addGroup(jPanel2Layout.createSequentialGroup()
                        .addComponent(jLabel17)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(papel3Ator2JTextField, javax.swing.GroupLayout.DEFAULT_SIZE, 193, Short.MAX_VALUE))
                    .addGroup(jPanel2Layout.createSequentialGroup()
                        .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(jLabel15)
                            .addComponent(jLabel14))
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(nomeAtor2JTextField, javax.swing.GroupLayout.DEFAULT_SIZE, 193, Short.MAX_VALUE)
                            .addComponent(papel1Ator2JTextField, javax.swing.GroupLayout.DEFAULT_SIZE, 193, Short.MAX_VALUE))))
                .addContainerGap())
        );
        jPanel2Layout.setVerticalGroup(
            jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel2Layout.createSequentialGroup()
                .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel14)
                    .addComponent(nomeAtor2JTextField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel15)
                    .addComponent(papel1Ator2JTextField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel16)
                    .addComponent(papel2Ator2JTextField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel17)
                    .addComponent(papel3Ator2JTextField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
        );

        atoresJTabbedPane.addTab(resourceMap.getString("jPanel2.TabConstraints.tabTitle"), jPanel2); // NOI18N

        jPanel3.setName("jPanel3"); // NOI18N

        jLabel18.setText(resourceMap.getString("jLabel18.text")); // NOI18N
        jLabel18.setName("jLabel18"); // NOI18N

        nomeAtor3JTextField.setName("nomeAtor3JTextField"); // NOI18N

        jLabel19.setText(resourceMap.getString("jLabel19.text")); // NOI18N
        jLabel19.setName("jLabel19"); // NOI18N

        papel1Ator3JTextField.setName("papel1Ator3JTextField"); // NOI18N

        jLabel20.setText(resourceMap.getString("jLabel20.text")); // NOI18N
        jLabel20.setName("jLabel20"); // NOI18N

        papel2Ator3JTextField.setName("papel2Ator3JTextField"); // NOI18N

        jLabel21.setText(resourceMap.getString("jLabel21.text")); // NOI18N
        jLabel21.setName("jLabel21"); // NOI18N

        papel3Ator3JTextField.setName("papel3Ator3JTextField"); // NOI18N

        javax.swing.GroupLayout jPanel3Layout = new javax.swing.GroupLayout(jPanel3);
        jPanel3.setLayout(jPanel3Layout);
        jPanel3Layout.setHorizontalGroup(
            jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel3Layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(jPanel3Layout.createSequentialGroup()
                        .addComponent(jLabel20)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(papel2Ator3JTextField, javax.swing.GroupLayout.DEFAULT_SIZE, 193, Short.MAX_VALUE))
                    .addGroup(jPanel3Layout.createSequentialGroup()
                        .addComponent(jLabel21)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(papel3Ator3JTextField, javax.swing.GroupLayout.DEFAULT_SIZE, 193, Short.MAX_VALUE))
                    .addGroup(jPanel3Layout.createSequentialGroup()
                        .addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(jLabel19)
                            .addComponent(jLabel18))
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(nomeAtor3JTextField, javax.swing.GroupLayout.DEFAULT_SIZE, 193, Short.MAX_VALUE)
                            .addComponent(papel1Ator3JTextField, javax.swing.GroupLayout.DEFAULT_SIZE, 193, Short.MAX_VALUE))))
                .addContainerGap())
        );
        jPanel3Layout.setVerticalGroup(
            jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel3Layout.createSequentialGroup()
                .addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel18)
                    .addComponent(nomeAtor3JTextField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel19)
                    .addComponent(papel1Ator3JTextField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel20)
                    .addComponent(papel2Ator3JTextField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel21)
                    .addComponent(papel3Ator3JTextField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
        );

        atoresJTabbedPane.addTab(resourceMap.getString("jPanel3.TabConstraints.tabTitle"), jPanel3); // NOI18N

        jPanel1.setName("jPanel1"); // NOI18N

        jLabel6.setText(resourceMap.getString("jLabel6.text")); // NOI18N
        jLabel6.setName("jLabel6"); // NOI18N

        nomeAtor4JTextField.setText(resourceMap.getString("nomeAtor4JTextField.text")); // NOI18N
        nomeAtor4JTextField.setName("nomeAtor4JTextField"); // NOI18N

        jLabel7.setText(resourceMap.getString("jLabel7.text")); // NOI18N
        jLabel7.setName("jLabel7"); // NOI18N

        papel1Ator4JTextField.setText(resourceMap.getString("papel1Ator4JTextField.text")); // NOI18N
        papel1Ator4JTextField.setName("papel1Ator4JTextField"); // NOI18N

        jLabel8.setText(resourceMap.getString("jLabel8.text")); // NOI18N
        jLabel8.setName("jLabel8"); // NOI18N

        papel2Ator4JTextField.setText(resourceMap.getString("papel2Ator4JTextField.text")); // NOI18N
        papel2Ator4JTextField.setName("papel2Ator4JTextField"); // NOI18N

        jLabel9.setText(resourceMap.getString("jLabel9.text")); // NOI18N
        jLabel9.setName("jLabel9"); // NOI18N

        papel3Ator4JTextField.setText(resourceMap.getString("papel3Ator4JTextField.text")); // NOI18N
        papel3Ator4JTextField.setName("papel3Ator4JTextField"); // NOI18N

        javax.swing.GroupLayout jPanel1Layout = new javax.swing.GroupLayout(jPanel1);
        jPanel1.setLayout(jPanel1Layout);
        jPanel1Layout.setHorizontalGroup(
            jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel1Layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(jPanel1Layout.createSequentialGroup()
                        .addComponent(jLabel8)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(papel2Ator4JTextField, javax.swing.GroupLayout.DEFAULT_SIZE, 193, Short.MAX_VALUE))
                    .addGroup(jPanel1Layout.createSequentialGroup()
                        .addComponent(jLabel9)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(papel3Ator4JTextField, javax.swing.GroupLayout.DEFAULT_SIZE, 193, Short.MAX_VALUE))
                    .addGroup(jPanel1Layout.createSequentialGroup()
                        .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(jLabel7)
                            .addComponent(jLabel6))
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(nomeAtor4JTextField, javax.swing.GroupLayout.DEFAULT_SIZE, 193, Short.MAX_VALUE)
                            .addComponent(papel1Ator4JTextField, javax.swing.GroupLayout.DEFAULT_SIZE, 193, Short.MAX_VALUE))))
                .addContainerGap())
        );
        jPanel1Layout.setVerticalGroup(
            jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel1Layout.createSequentialGroup()
                .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel6)
                    .addComponent(nomeAtor4JTextField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel7)
                    .addComponent(papel1Ator4JTextField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel8)
                    .addComponent(papel2Ator4JTextField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel9)
                    .addComponent(papel3Ator4JTextField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
        );

        atoresJTabbedPane.addTab(resourceMap.getString("jPanel1.TabConstraints.tabTitle"), jPanel1); // NOI18N

        jLabel37.setText(resourceMap.getString("jLabel37.text")); // NOI18N
        jLabel37.setName("jLabel37"); // NOI18N

        idFilmeJTextField.setText(resourceMap.getString("idFilmeJTextField.text")); // NOI18N
        idFilmeJTextField.setEnabled(false);
        idFilmeJTextField.setName("idFilmeJTextField"); // NOI18N

        javax.swing.GroupLayout formFilmesJPanelLayout = new javax.swing.GroupLayout(formFilmesJPanel);
        formFilmesJPanel.setLayout(formFilmesJPanelLayout);
        formFilmesJPanelLayout.setHorizontalGroup(
            formFilmesJPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(formFilmesJPanelLayout.createSequentialGroup()
                .addGroup(formFilmesJPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(formFilmesJPanelLayout.createSequentialGroup()
                        .addGroup(formFilmesJPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING, false)
                            .addGroup(javax.swing.GroupLayout.Alignment.LEADING, formFilmesJPanelLayout.createSequentialGroup()
                                .addComponent(jPanel5, javax.swing.GroupLayout.PREFERRED_SIZE, 90, javax.swing.GroupLayout.PREFERRED_SIZE)
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                .addComponent(jPanel6, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                .addComponent(jPanel7, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
                            .addGroup(javax.swing.GroupLayout.Alignment.LEADING, formFilmesJPanelLayout.createSequentialGroup()
                                .addGroup(formFilmesJPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                    .addComponent(jLabel2)
                                    .addComponent(jLabel1))
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                .addGroup(formFilmesJPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                                    .addComponent(nomeJTextField)
                                    .addComponent(nomeOriginalJTextField, javax.swing.GroupLayout.DEFAULT_SIZE, 314, Short.MAX_VALUE))))
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addGroup(formFilmesJPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addGroup(formFilmesJPanelLayout.createSequentialGroup()
                                .addGroup(formFilmesJPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                    .addComponent(jLabel3)
                                    .addComponent(jLabel4))
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                .addGroup(formFilmesJPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                                    .addComponent(duracaoJTextField)
                                    .addComponent(anoJTextField, javax.swing.GroupLayout.DEFAULT_SIZE, 92, Short.MAX_VALUE))
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                .addGroup(formFilmesJPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                                    .addComponent(jLabel5)
                                    .addComponent(jLabel37))
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                .addGroup(formFilmesJPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                    .addComponent(idFilmeJTextField, javax.swing.GroupLayout.DEFAULT_SIZE, 57, Short.MAX_VALUE)
                                    .addComponent(quantidadeJTextField, javax.swing.GroupLayout.DEFAULT_SIZE, 57, Short.MAX_VALUE)))
                            .addComponent(atoresJTabbedPane, javax.swing.GroupLayout.DEFAULT_SIZE, 257, Short.MAX_VALUE)))
                    .addGroup(formFilmesJPanelLayout.createSequentialGroup()
                        .addGap(6, 6, 6)
                        .addComponent(consultarFilmeJButton)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(limparFormConsultaFilmeJButton)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(salvarFilmeJButton)))
                .addContainerGap())
        );
        formFilmesJPanelLayout.setVerticalGroup(
            formFilmesJPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, formFilmesJPanelLayout.createSequentialGroup()
                .addGroup(formFilmesJPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(nomeJTextField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(anoJTextField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jLabel3)
                    .addComponent(jLabel5)
                    .addComponent(quantidadeJTextField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jLabel1))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(formFilmesJPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel2)
                    .addComponent(nomeOriginalJTextField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jLabel4)
                    .addComponent(duracaoJTextField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(idFilmeJTextField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jLabel37))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(formFilmesJPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(formFilmesJPanelLayout.createSequentialGroup()
                        .addGroup(formFilmesJPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(jPanel7, 0, 137, Short.MAX_VALUE)
                            .addComponent(jPanel5, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                            .addComponent(jPanel6, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addGroup(formFilmesJPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(consultarFilmeJButton)
                            .addComponent(limparFormConsultaFilmeJButton)
                            .addComponent(salvarFilmeJButton)))
                    .addGroup(formFilmesJPanelLayout.createSequentialGroup()
                        .addComponent(atoresJTabbedPane, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addGap(29, 29, 29))))
        );

        resultadoConsultaFilmeJPanel.setBorder(javax.swing.BorderFactory.createTitledBorder(resourceMap.getString("resultadoConsultaFilmeJPanel.border.title"))); // NOI18N
        resultadoConsultaFilmeJPanel.setEnabled(false);
        resultadoConsultaFilmeJPanel.setName("resultadoConsultaFilmeJPanel"); // NOI18N

        jScrollPane1.setName("jScrollPane1"); // NOI18N

        resultadoTabelaFilmeJTable.setModel(new javax.swing.table.DefaultTableModel(
            new Object [][] {
                {null, null, null, null},
                {null, null, null, null},
                {null, null, null, null},
                {null, null, null, null},
                {null, null, null, null},
                {null, null, null, null},
                {null, null, null, null},
                {null, null, null, null},
                {null, null, null, null},
                {null, null, null, null},
                {null, null, null, null},
                {null, null, null, null},
                {null, null, null, null},
                {null, null, null, null},
                {null, null, null, null}
            },
            new String [] {
                "Nome", "Nome Original", "Ano", "Id"
            }
        ) {
            Class[] types = new Class [] {
                java.lang.String.class, java.lang.String.class, java.lang.String.class, java.lang.Integer.class
            };
            boolean[] canEdit = new boolean [] {
                false, false, false, false
            };

            public Class getColumnClass(int columnIndex) {
                return types [columnIndex];
            }

            public boolean isCellEditable(int rowIndex, int columnIndex) {
                return canEdit [columnIndex];
            }
        });
        resultadoTabelaFilmeJTable.setEnabled(false);
        resultadoTabelaFilmeJTable.setName("resultadoTabelaFilmeJTable"); // NOI18N
        jScrollPane1.setViewportView(resultadoTabelaFilmeJTable);
        resultadoTabelaFilmeJTable.getColumnModel().getColumn(0).setHeaderValue(resourceMap.getString("resultadoTabelaFilmeJTable.columnModel.title0")); // NOI18N
        resultadoTabelaFilmeJTable.getColumnModel().getColumn(1).setHeaderValue(resourceMap.getString("resultadoTabelaFilmeJTable.columnModel.title1")); // NOI18N
        resultadoTabelaFilmeJTable.getColumnModel().getColumn(2).setHeaderValue(resourceMap.getString("resultadoTabelaFilmeJTable.columnModel.title2")); // NOI18N
        resultadoTabelaFilmeJTable.getColumnModel().getColumn(3).setHeaderValue(resourceMap.getString("resultadoTabelaFilmeJTable.columnModel.title3")); // NOI18N

        excluirFilmesJButton.setText(resourceMap.getString("excluirFilmesJButton.text")); // NOI18N
        excluirFilmesJButton.setName("excluirFilmesJButton"); // NOI18N
        excluirFilmesJButton.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                excluirFilmesJButtonActionPerformed(evt);
            }
        });

        javax.swing.GroupLayout resultadoConsultaFilmeJPanelLayout = new javax.swing.GroupLayout(resultadoConsultaFilmeJPanel);
        resultadoConsultaFilmeJPanel.setLayout(resultadoConsultaFilmeJPanelLayout);
        resultadoConsultaFilmeJPanelLayout.setHorizontalGroup(
            resultadoConsultaFilmeJPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addComponent(jScrollPane1, javax.swing.GroupLayout.DEFAULT_SIZE, 664, Short.MAX_VALUE)
            .addGroup(resultadoConsultaFilmeJPanelLayout.createSequentialGroup()
                .addComponent(excluirFilmesJButton)
                .addContainerGap())
        );
        resultadoConsultaFilmeJPanelLayout.setVerticalGroup(
            resultadoConsultaFilmeJPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(resultadoConsultaFilmeJPanelLayout.createSequentialGroup()
                .addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 153, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                .addComponent(excluirFilmesJButton))
        );

        javax.swing.GroupLayout filmesJPanelLayout = new javax.swing.GroupLayout(filmesJPanel);
        filmesJPanel.setLayout(filmesJPanelLayout);
        filmesJPanelLayout.setHorizontalGroup(
            filmesJPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(filmesJPanelLayout.createSequentialGroup()
                .addGroup(filmesJPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING, false)
                    .addComponent(resultadoConsultaFilmeJPanel, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                    .addComponent(formFilmesJPanel, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
        );
        filmesJPanelLayout.setVerticalGroup(
            filmesJPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(filmesJPanelLayout.createSequentialGroup()
                .addComponent(formFilmesJPanel, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(resultadoConsultaFilmeJPanel, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addContainerGap(16, Short.MAX_VALUE))
        );

        geraljTabbedPane.addTab(resourceMap.getString("filmesJPanel.TabConstraints.tabTitle"), filmesJPanel); // NOI18N

        clientesJPanel.setName("clientesJPanel"); // NOI18N

        formClientesJPanel.setBorder(javax.swing.BorderFactory.createTitledBorder(resourceMap.getString("formClientesJPanel.border.title"))); // NOI18N
        formClientesJPanel.setName("formClientesJPanel"); // NOI18N

        jLabel22.setText(resourceMap.getString("jLabel22.text")); // NOI18N
        jLabel22.setName("jLabel22"); // NOI18N

        nomeClienteJTextField.setText(resourceMap.getString("nomeClienteJTextField.text")); // NOI18N
        nomeClienteJTextField.setName("nomeClienteJTextField"); // NOI18N

        jLabel23.setText(resourceMap.getString("jLabel23.text")); // NOI18N
        jLabel23.setName("jLabel23"); // NOI18N

        jLabel24.setText(resourceMap.getString("jLabel24.text")); // NOI18N
        jLabel24.setName("jLabel24"); // NOI18N

        telefoneClienteJTextField.setText(resourceMap.getString("telefoneClienteJTextField.text")); // NOI18N
        telefoneClienteJTextField.setName("telefoneClienteJTextField"); // NOI18N

        jLabel25.setText(resourceMap.getString("jLabel25.text")); // NOI18N
        jLabel25.setName("jLabel25"); // NOI18N

        nascimentoClienteJTextField.setText(resourceMap.getString("nascimentoClienteJTextField.text")); // NOI18N
        nascimentoClienteJTextField.setName("nascimentoClienteJTextField"); // NOI18N

        cpfClienteJTextField.setText(resourceMap.getString("cpfClienteJTextField.text")); // NOI18N
        cpfClienteJTextField.setName("cpfClienteJTextField"); // NOI18N

        jLabel26.setText(resourceMap.getString("jLabel26.text")); // NOI18N
        jLabel26.setName("jLabel26"); // NOI18N

        enderecoClienteJTextField.setText(resourceMap.getString("enderecoClienteJTextField.text")); // NOI18N
        enderecoClienteJTextField.setName("enderecoClienteJTextField"); // NOI18N

        jLabel27.setText(resourceMap.getString("jLabel27.text")); // NOI18N
        jLabel27.setName("jLabel27"); // NOI18N

        cepClienteJTextField.setText(resourceMap.getString("cepClienteJTextField.text")); // NOI18N
        cepClienteJTextField.setName("cepClienteJTextField"); // NOI18N

        jLabel28.setText(resourceMap.getString("jLabel28.text")); // NOI18N
        jLabel28.setName("jLabel28"); // NOI18N

        cidadeClienteJTextField.setText(resourceMap.getString("cidadeClienteJTextField.text")); // NOI18N
        cidadeClienteJTextField.setName("cidadeClienteJTextField"); // NOI18N

        jLabel29.setText(resourceMap.getString("jLabel29.text")); // NOI18N
        jLabel29.setName("jLabel29"); // NOI18N

        bairroClienteJTextField.setText(resourceMap.getString("bairroClienteJTextField.text")); // NOI18N
        bairroClienteJTextField.setName("bairroClienteJTextField"); // NOI18N

        titularClienteJCheckBox.setText(resourceMap.getString("titularClienteJCheckBox.text")); // NOI18N
        titularClienteJCheckBox.setName("titularClienteJCheckBox"); // NOI18N

        consultaClienteJButton.setText(resourceMap.getString("consultaClienteJButton.text")); // NOI18N
        consultaClienteJButton.setName("consultaClienteJButton"); // NOI18N
        consultaClienteJButton.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                consultaClienteJButtonActionPerformed(evt);
            }
        });

        limparFormConsultaClienteJButton.setText(resourceMap.getString("limparFormConsultaClienteJButton.text")); // NOI18N
        limparFormConsultaClienteJButton.setName("limparFormConsultaClienteJButton"); // NOI18N
        limparFormConsultaClienteJButton.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                limparFormConsultaClienteJButtonActionPerformed(evt);
            }
        });

        salvarClienteJButton.setText(resourceMap.getString("salvarClienteJButton.text")); // NOI18N
        salvarClienteJButton.setName("salvarClienteJButton"); // NOI18N
        salvarClienteJButton.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                salvarClienteJButtonActionPerformed(evt);
            }
        });

        jLabel38.setText(resourceMap.getString("jLabel38.text")); // NOI18N
        jLabel38.setName("jLabel38"); // NOI18N

        idClienteJTextField.setEditable(false);
        idClienteJTextField.setText(resourceMap.getString("idClienteJTextField.text")); // NOI18N
        idClienteJTextField.setName("idClienteJTextField"); // NOI18N

        javax.swing.GroupLayout formClientesJPanelLayout = new javax.swing.GroupLayout(formClientesJPanel);
        formClientesJPanel.setLayout(formClientesJPanelLayout);
        formClientesJPanelLayout.setHorizontalGroup(
            formClientesJPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(formClientesJPanelLayout.createSequentialGroup()
                .addGroup(formClientesJPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(formClientesJPanelLayout.createSequentialGroup()
                        .addGroup(formClientesJPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(jLabel22)
                            .addComponent(jLabel24)
                            .addComponent(jLabel28))
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addGroup(formClientesJPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                            .addGroup(formClientesJPanelLayout.createSequentialGroup()
                                .addComponent(nomeClienteJTextField, javax.swing.GroupLayout.PREFERRED_SIZE, 353, javax.swing.GroupLayout.PREFERRED_SIZE)
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                .addComponent(jLabel23)
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                .addComponent(telefoneClienteJTextField))
                            .addGroup(formClientesJPanelLayout.createSequentialGroup()
                                .addGroup(formClientesJPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING, false)
                                    .addComponent(cidadeClienteJTextField, javax.swing.GroupLayout.Alignment.LEADING)
                                    .addComponent(cpfClienteJTextField, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, 139, Short.MAX_VALUE))
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                .addGroup(formClientesJPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                    .addComponent(jLabel26)
                                    .addComponent(jLabel29))
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                .addGroup(formClientesJPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                    .addGroup(formClientesJPanelLayout.createSequentialGroup()
                                        .addComponent(bairroClienteJTextField, javax.swing.GroupLayout.PREFERRED_SIZE, 161, javax.swing.GroupLayout.PREFERRED_SIZE)
                                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                        .addComponent(jLabel38)
                                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                        .addComponent(idClienteJTextField, javax.swing.GroupLayout.PREFERRED_SIZE, 45, javax.swing.GroupLayout.PREFERRED_SIZE)
                                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                        .addComponent(titularClienteJCheckBox))
                                    .addComponent(enderecoClienteJTextField, javax.swing.GroupLayout.PREFERRED_SIZE, 290, javax.swing.GroupLayout.PREFERRED_SIZE))))
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addGroup(formClientesJPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                            .addComponent(jLabel25)
                            .addComponent(jLabel27))
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addGroup(formClientesJPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                            .addComponent(cepClienteJTextField, javax.swing.GroupLayout.DEFAULT_SIZE, 71, Short.MAX_VALUE)
                            .addComponent(nascimentoClienteJTextField, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, 71, Short.MAX_VALUE)))
                    .addGroup(formClientesJPanelLayout.createSequentialGroup()
                        .addComponent(consultaClienteJButton)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(limparFormConsultaClienteJButton)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(salvarClienteJButton)))
                .addContainerGap())
        );
        formClientesJPanelLayout.setVerticalGroup(
            formClientesJPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(formClientesJPanelLayout.createSequentialGroup()
                .addGroup(formClientesJPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel22)
                    .addComponent(nomeClienteJTextField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jLabel23)
                    .addComponent(telefoneClienteJTextField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(nascimentoClienteJTextField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jLabel25))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(formClientesJPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel24)
                    .addComponent(cpfClienteJTextField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jLabel26)
                    .addComponent(enderecoClienteJTextField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(cepClienteJTextField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jLabel27))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(formClientesJPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel28)
                    .addComponent(cidadeClienteJTextField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jLabel29)
                    .addComponent(bairroClienteJTextField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jLabel38)
                    .addComponent(idClienteJTextField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(titularClienteJCheckBox))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(formClientesJPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(consultaClienteJButton)
                    .addComponent(limparFormConsultaClienteJButton)
                    .addComponent(salvarClienteJButton)))
        );

        resultadoConsultaClientesJPanel.setBorder(javax.swing.BorderFactory.createTitledBorder(resourceMap.getString("resultadoConsultaClientesJPanel.border.title"))); // NOI18N
        resultadoConsultaClientesJPanel.setName("resultadoConsultaClientesJPanel"); // NOI18N

        jScrollPane2.setName("jScrollPane2"); // NOI18N

        resultadoTabelaClienteJTable.setModel(new javax.swing.table.DefaultTableModel(
            new Object [][] {
                {null, null, null},
                {null, null, null},
                {null, null, null},
                {null, null, null},
                {null, null, null},
                {null, null, null},
                {null, null, null},
                {null, null, null},
                {null, null, null},
                {null, null, null},
                {null, null, null},
                {null, null, null},
                {null, null, null},
                {null, null, null},
                {null, null, null},
                {null, null, null},
                {null, null, null},
                {null, null, null},
                {null, null, null},
                {null, null, null}
            },
            new String [] {
                "Nome Cliente", "CPF", "Codigo do Cliente"
            }
        ) {
            Class[] types = new Class [] {
                java.lang.String.class, java.lang.String.class, java.lang.String.class
            };
            boolean[] canEdit = new boolean [] {
                false, false, false
            };

            public Class getColumnClass(int columnIndex) {
                return types [columnIndex];
            }

            public boolean isCellEditable(int rowIndex, int columnIndex) {
                return canEdit [columnIndex];
            }
        });
        resultadoTabelaClienteJTable.setEnabled(false);
        resultadoTabelaClienteJTable.setName("resultadoTabelaClienteJTable"); // NOI18N
        jScrollPane2.setViewportView(resultadoTabelaClienteJTable);
        resultadoTabelaClienteJTable.getColumnModel().getColumn(0).setHeaderValue(resourceMap.getString("resultadoTabelaClienteJTable.columnModel.title0")); // NOI18N
        resultadoTabelaClienteJTable.getColumnModel().getColumn(1).setHeaderValue(resourceMap.getString("resultadoTabelaClienteJTable.columnModel.title1")); // NOI18N
        resultadoTabelaClienteJTable.getColumnModel().getColumn(2).setHeaderValue(resourceMap.getString("resultadoTabelaJTable1.columnModel.title3")); // NOI18N

        excluirClientesJButton.setText(resourceMap.getString("excluirClientesJButton.text")); // NOI18N
        excluirClientesJButton.setName("excluirClientesJButton"); // NOI18N
        excluirClientesJButton.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                excluirClientesJButtonActionPerformed(evt);
            }
        });

        javax.swing.GroupLayout resultadoConsultaClientesJPanelLayout = new javax.swing.GroupLayout(resultadoConsultaClientesJPanel);
        resultadoConsultaClientesJPanel.setLayout(resultadoConsultaClientesJPanelLayout);
        resultadoConsultaClientesJPanelLayout.setHorizontalGroup(
            resultadoConsultaClientesJPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addComponent(jScrollPane2, javax.swing.GroupLayout.DEFAULT_SIZE, 663, Short.MAX_VALUE)
            .addGroup(resultadoConsultaClientesJPanelLayout.createSequentialGroup()
                .addComponent(excluirClientesJButton)
                .addContainerGap())
        );
        resultadoConsultaClientesJPanelLayout.setVerticalGroup(
            resultadoConsultaClientesJPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, resultadoConsultaClientesJPanelLayout.createSequentialGroup()
                .addComponent(jScrollPane2, javax.swing.GroupLayout.DEFAULT_SIZE, 275, Short.MAX_VALUE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(excluirClientesJButton))
        );

        javax.swing.GroupLayout clientesJPanelLayout = new javax.swing.GroupLayout(clientesJPanel);
        clientesJPanel.setLayout(clientesJPanelLayout);
        clientesJPanelLayout.setHorizontalGroup(
            clientesJPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, clientesJPanelLayout.createSequentialGroup()
                .addGroup(clientesJPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                    .addComponent(resultadoConsultaClientesJPanel, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                    .addComponent(formClientesJPanel, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
                .addContainerGap())
        );
        clientesJPanelLayout.setVerticalGroup(
            clientesJPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(clientesJPanelLayout.createSequentialGroup()
                .addComponent(formClientesJPanel, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(resultadoConsultaClientesJPanel, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                .addContainerGap())
        );

        geraljTabbedPane.addTab(resourceMap.getString("clientesJPanel.TabConstraints.tabTitle"), clientesJPanel); // NOI18N

        alugueisJPanel.setName("alugueisJPanel"); // NOI18N

        formAlugueisJPanel.setBorder(javax.swing.BorderFactory.createTitledBorder(resourceMap.getString("formAlugueisJPanel.border.title"))); // NOI18N
        formAlugueisJPanel.setName("formAlugueisJPanel"); // NOI18N

        jLabel30.setText(resourceMap.getString("jLabel30.text")); // NOI18N
        jLabel30.setName("jLabel30"); // NOI18N

        codigoClienteAluguelJTextField.setText(resourceMap.getString("codigoClienteAluguelJTextField.text")); // NOI18N
        codigoClienteAluguelJTextField.setName("codigoClienteAluguelJTextField"); // NOI18N

        jLabel32.setText(resourceMap.getString("jLabel32.text")); // NOI18N
        jLabel32.setName("jLabel32"); // NOI18N

        idFilmeAluguelJTextField.setText(resourceMap.getString("idFilmeAluguelJTextField.text")); // NOI18N
        idFilmeAluguelJTextField.setName("idFilmeAluguelJTextField"); // NOI18N

        consultaAluguelButton.setText(resourceMap.getString("consultaAluguelButton.text")); // NOI18N
        consultaAluguelButton.setName("consultaAluguelButton"); // NOI18N
        consultaAluguelButton.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                consultaAluguelButtonActionPerformed(evt);
            }
        });

        jLabel34.setText(resourceMap.getString("jLabel34.text")); // NOI18N
        jLabel34.setName("jLabel34"); // NOI18N

        dataAluguelJTextField.setText(resourceMap.getString("dataAluguelJTextField.text")); // NOI18N
        dataAluguelJTextField.setName("dataAluguelJTextField"); // NOI18N

        jLabel35.setText(resourceMap.getString("jLabel35.text")); // NOI18N
        jLabel35.setName("jLabel35"); // NOI18N

        dataDevolucaoJTextField.setText(resourceMap.getString("dataDevolucaoJTextField.text")); // NOI18N
        dataDevolucaoJTextField.setName("dataDevolucaoJTextField"); // NOI18N

        salvarAluguelJButton.setText(resourceMap.getString("salvarAluguelJButton.text")); // NOI18N
        salvarAluguelJButton.setName("salvarAluguelJButton"); // NOI18N
        salvarAluguelJButton.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                salvarAluguelJButtonActionPerformed(evt);
            }
        });

        jLabel31.setText(resourceMap.getString("jLabel31.text")); // NOI18N
        jLabel31.setName("jLabel31"); // NOI18N

        codigoCopiaFilmeJTextField.setText(resourceMap.getString("codigoCopiaFilmeJTextField.text")); // NOI18N
        codigoCopiaFilmeJTextField.setName("codigoCopiaFilmeJTextField"); // NOI18N

        javax.swing.GroupLayout formAlugueisJPanelLayout = new javax.swing.GroupLayout(formAlugueisJPanel);
        formAlugueisJPanel.setLayout(formAlugueisJPanelLayout);
        formAlugueisJPanelLayout.setHorizontalGroup(
            formAlugueisJPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(formAlugueisJPanelLayout.createSequentialGroup()
                .addGroup(formAlugueisJPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(formAlugueisJPanelLayout.createSequentialGroup()
                        .addComponent(jLabel30)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(codigoClienteAluguelJTextField, javax.swing.GroupLayout.PREFERRED_SIZE, 49, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(jLabel32)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(idFilmeAluguelJTextField, javax.swing.GroupLayout.PREFERRED_SIZE, 50, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(jLabel34)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(dataAluguelJTextField, javax.swing.GroupLayout.PREFERRED_SIZE, 80, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(jLabel35)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(dataDevolucaoJTextField, javax.swing.GroupLayout.PREFERRED_SIZE, 79, javax.swing.GroupLayout.PREFERRED_SIZE))
                    .addGroup(formAlugueisJPanelLayout.createSequentialGroup()
                        .addComponent(jLabel31)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(codigoCopiaFilmeJTextField, javax.swing.GroupLayout.PREFERRED_SIZE, 48, javax.swing.GroupLayout.PREFERRED_SIZE))
                    .addGroup(formAlugueisJPanelLayout.createSequentialGroup()
                        .addComponent(consultaAluguelButton)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(salvarAluguelJButton)))
                .addContainerGap(103, Short.MAX_VALUE))
        );
        formAlugueisJPanelLayout.setVerticalGroup(
            formAlugueisJPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(formAlugueisJPanelLayout.createSequentialGroup()
                .addGroup(formAlugueisJPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel30)
                    .addComponent(codigoClienteAluguelJTextField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jLabel32)
                    .addComponent(idFilmeAluguelJTextField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jLabel34)
                    .addComponent(dataAluguelJTextField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jLabel35)
                    .addComponent(dataDevolucaoJTextField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(formAlugueisJPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel31)
                    .addComponent(codigoCopiaFilmeJTextField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(formAlugueisJPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(consultaAluguelButton)
                    .addComponent(salvarAluguelJButton)))
        );

        jPanel8.setBorder(javax.swing.BorderFactory.createTitledBorder(resourceMap.getString("jPanel8.border.title"))); // NOI18N
        jPanel8.setName("jPanel8"); // NOI18N

        jScrollPane3.setName("jScrollPane3"); // NOI18N

        resultadoTabelaAluguelJTable.setModel(new javax.swing.table.DefaultTableModel(
            new Object [][] {
                {null, null, null, null, null},
                {null, null, null, null, null},
                {null, null, null, null, null},
                {null, null, null, null, null},
                {null, null, null, null, null},
                {null, null, null, null, null},
                {null, null, null, null, null},
                {null, null, null, null, null},
                {null, null, null, null, null},
                {null, null, null, null, null},
                {null, null, null, null, null},
                {null, null, null, null, null},
                {null, null, null, null, null},
                {null, null, null, null, null},
                {null, null, null, null, null},
                {null, null, null, null, null},
                {null, null, null, null, null},
                {null, null, null, null, null},
                {null, null, null, null, null},
                {null, null, null, null, null}
            },
            new String [] {
                "Codigo do Cliente", "Id do Filme", "Data aluguel", "Data devolucao", "Cod.da Copia do Filme"
            }
        ) {
            Class[] types = new Class [] {
                java.lang.String.class, java.lang.String.class, java.lang.String.class, java.lang.String.class, java.lang.String.class
            };
            boolean[] canEdit = new boolean [] {
                false, false, false, false, false
            };

            public Class getColumnClass(int columnIndex) {
                return types [columnIndex];
            }

            public boolean isCellEditable(int rowIndex, int columnIndex) {
                return canEdit [columnIndex];
            }
        });
        resultadoTabelaAluguelJTable.setEnabled(false);
        resultadoTabelaAluguelJTable.setName("resultadoTabelaAluguelJTable"); // NOI18N
        jScrollPane3.setViewportView(resultadoTabelaAluguelJTable);
        resultadoTabelaAluguelJTable.getColumnModel().getColumn(0).setHeaderValue(resourceMap.getString("resultadoTabelaAluguelJTable.columnModel.title0")); // NOI18N
        resultadoTabelaAluguelJTable.getColumnModel().getColumn(1).setHeaderValue(resourceMap.getString("resultadoTabelaAluguelJTable.columnModel.title1")); // NOI18N
        resultadoTabelaAluguelJTable.getColumnModel().getColumn(2).setHeaderValue(resourceMap.getString("resultadoTabelaAluguelJTable.columnModel.title3")); // NOI18N
        resultadoTabelaAluguelJTable.getColumnModel().getColumn(3).setHeaderValue(resourceMap.getString("resultadoTabelaAluguelJTable.columnModel.title2")); // NOI18N
        resultadoTabelaAluguelJTable.getColumnModel().getColumn(4).setHeaderValue(resourceMap.getString("resultadoTabelaAluguelJTable.columnModel.title4")); // NOI18N

        jLabel36.setText(resourceMap.getString("jLabel36.text")); // NOI18N
        jLabel36.setName("jLabel36"); // NOI18N

        encerrarAlugueisJButton.setText(resourceMap.getString("encerrarAlugueisJButton.text")); // NOI18N
        encerrarAlugueisJButton.setName("encerrarAlugueisJButton"); // NOI18N
        encerrarAlugueisJButton.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                encerrarAlugueisJButtonActionPerformed(evt);
            }
        });

        javax.swing.GroupLayout jPanel8Layout = new javax.swing.GroupLayout(jPanel8);
        jPanel8.setLayout(jPanel8Layout);
        jPanel8Layout.setHorizontalGroup(
            jPanel8Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addComponent(jScrollPane3, javax.swing.GroupLayout.DEFAULT_SIZE, 678, Short.MAX_VALUE)
            .addGroup(jPanel8Layout.createSequentialGroup()
                .addComponent(encerrarAlugueisJButton)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(jLabel36)
                .addGap(315, 315, 315))
        );
        jPanel8Layout.setVerticalGroup(
            jPanel8Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel8Layout.createSequentialGroup()
                .addComponent(jScrollPane3, javax.swing.GroupLayout.DEFAULT_SIZE, 297, Short.MAX_VALUE)
                .addGap(10, 10, 10)
                .addGroup(jPanel8Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(encerrarAlugueisJButton)
                    .addComponent(jLabel36)))
        );

        javax.swing.GroupLayout alugueisJPanelLayout = new javax.swing.GroupLayout(alugueisJPanel);
        alugueisJPanel.setLayout(alugueisJPanelLayout);
        alugueisJPanelLayout.setHorizontalGroup(
            alugueisJPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, alugueisJPanelLayout.createSequentialGroup()
                .addGroup(alugueisJPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                    .addComponent(jPanel8, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                    .addComponent(formAlugueisJPanel, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
                .addContainerGap())
        );
        alugueisJPanelLayout.setVerticalGroup(
            alugueisJPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(alugueisJPanelLayout.createSequentialGroup()
                .addComponent(formAlugueisJPanel, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(jPanel8, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                .addContainerGap())
        );

        geraljTabbedPane.addTab(resourceMap.getString("alugueisJPanel.TabConstraints.tabTitle"), alugueisJPanel); // NOI18N

        javax.swing.GroupLayout mainPanelLayout = new javax.swing.GroupLayout(mainPanel);
        mainPanel.setLayout(mainPanelLayout);
        mainPanelLayout.setHorizontalGroup(
            mainPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(mainPanelLayout.createSequentialGroup()
                .addComponent(geraljTabbedPane, javax.swing.GroupLayout.PREFERRED_SIZE, 694, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
        );
        mainPanelLayout.setVerticalGroup(
            mainPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addComponent(geraljTabbedPane, javax.swing.GroupLayout.DEFAULT_SIZE, 510, Short.MAX_VALUE)
        );

        menuBar.setName("menuBar"); // NOI18N

        fileMenu.setText(resourceMap.getString("fileMenu.text")); // NOI18N
        fileMenu.setName("fileMenu"); // NOI18N

        javax.swing.ActionMap actionMap = org.jdesktop.application.Application.getInstance(View.JanelaLocadoraApp.class).getContext().getActionMap(JanelaLocadoraView.class, this);
        exitMenuItem.setAction(actionMap.get("quit")); // NOI18N
        exitMenuItem.setText(resourceMap.getString("exitMenuItem.text")); // NOI18N
        exitMenuItem.setName("exitMenuItem"); // NOI18N
        fileMenu.add(exitMenuItem);

        menuBar.add(fileMenu);

        jMenu1.setText(resourceMap.getString("jMenu1.text")); // NOI18N
        jMenu1.setName("jMenu1"); // NOI18N

        jMenuItem1.setText(resourceMap.getString("jMenuItem1.text")); // NOI18N
        jMenuItem1.setName("jMenuItem1"); // NOI18N
        jMenu1.add(jMenuItem1);

        menuBar.add(jMenu1);

        helpMenu.setText(resourceMap.getString("helpMenu.text")); // NOI18N
        helpMenu.setName("helpMenu"); // NOI18N

        aboutMenuItem.setAction(actionMap.get("showAboutBox")); // NOI18N
        aboutMenuItem.setText(resourceMap.getString("aboutMenuItem.text")); // NOI18N
        aboutMenuItem.setName("aboutMenuItem"); // NOI18N
        helpMenu.add(aboutMenuItem);

        menuBar.add(helpMenu);

        statusPanel.setName("statusPanel"); // NOI18N

        statusPanelSeparator.setName("statusPanelSeparator"); // NOI18N

        statusMessageLabel.setName("statusMessageLabel"); // NOI18N

        statusAnimationLabel.setHorizontalAlignment(javax.swing.SwingConstants.LEFT);
        statusAnimationLabel.setName("statusAnimationLabel"); // NOI18N

        progressBar.setName("progressBar"); // NOI18N

        javax.swing.GroupLayout statusPanelLayout = new javax.swing.GroupLayout(statusPanel);
        statusPanel.setLayout(statusPanelLayout);
        statusPanelLayout.setHorizontalGroup(
            statusPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addComponent(statusPanelSeparator, javax.swing.GroupLayout.DEFAULT_SIZE, 704, Short.MAX_VALUE)
            .addGroup(statusPanelLayout.createSequentialGroup()
                .addContainerGap()
                .addComponent(statusMessageLabel)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 534, Short.MAX_VALUE)
                .addComponent(progressBar, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(statusAnimationLabel)
                .addContainerGap())
        );
        statusPanelLayout.setVerticalGroup(
            statusPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(statusPanelLayout.createSequentialGroup()
                .addComponent(statusPanelSeparator, javax.swing.GroupLayout.PREFERRED_SIZE, 2, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                .addGroup(statusPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(statusMessageLabel)
                    .addComponent(statusAnimationLabel)
                    .addComponent(progressBar, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addGap(3, 3, 3))
        );

        idiomaButtonGroup.add(inglesJRadioButton);
        idiomaButtonGroup.add(espanholJRadioButton);
        idiomaButtonGroup.add(portuguesJRadioButton);
        idiomaButtonGroup.add(outroJRadioButton);

        setComponent(mainPanel);
        setMenuBar(menuBar);
        setStatusBar(statusPanel);
    }// </editor-fold>//GEN-END:initComponents

    private void consultarFilmeJButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_consultarFilmeJButtonActionPerformed
        Filme filme = getConteudoConsultaFormFilme();
        ArrayList<Filme> filmesCollection = null;
        int i = 0;

        limpaJTable(resultadoTabelaFilmeJTable);
        resultadoTabelaFilmeJTable.setEnabled(true);

        filmesCollection = (ArrayList<Filme>) locadora.consultarFilmes(filme);
        filmesHashResultado = new HashMap<Integer, Filme>();
        for (Iterator<Filme> it = filmesCollection.iterator(); it.hasNext();i++) {
            filme = it.next();
            filmesHashResultado.put(i,filme);
        }

        i = 0;
        for (Iterator it = filmesCollection.iterator(); it.hasNext(); i++) {
            Filme filmeIt = (Filme) it.next();
            
            resultadoTabelaFilmeJTable.setValueAt(filmeIt.getNome(),i,0);
            resultadoTabelaFilmeJTable.setValueAt(filmeIt.getNomeOriginal(),i,1);
            resultadoTabelaFilmeJTable.setValueAt(filmeIt.getAno(), i, 2);
            resultadoTabelaFilmeJTable.setValueAt(filmeIt.getId(), i, 3);
        }
}//GEN-LAST:event_consultarFilmeJButtonActionPerformed

    private void limparFormConsultaFilmeJButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_limparFormConsultaFilmeJButtonActionPerformed
        limpaFormConsultaFilme();
}//GEN-LAST:event_limparFormConsultaFilmeJButtonActionPerformed

    private void salvarFilmeJButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_salvarFilmeJButtonActionPerformed
        Filme filme = getConteudoConsultaFormFilme();

        if ( filme.getId() != -1 )
            locadora.manipularFilme(filme, Locadora.alterar);
        else
            locadora.manipularFilme(filme, Locadora.inserir);
    }//GEN-LAST:event_salvarFilmeJButtonActionPerformed

    private void consultaClienteJButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_consultaClienteJButtonActionPerformed
        Cliente cliente = getConteudoConsultaFormCliente();
        ArrayList<Cliente> clientesCollection = null;
        int i = 0;

        limpaJTable(resultadoTabelaClienteJTable);
        resultadoTabelaClienteJTable.setEnabled(true);

        clientesCollection = (ArrayList<Cliente>) locadora.consultarClientes(cliente);
        clientesHashResultado = new HashMap<Integer, Cliente>();
        for (Iterator<Cliente> it = clientesCollection.iterator(); it.hasNext(); i++) {
            cliente = it.next();
            clientesHashResultado.put(i, cliente);
        }

        i = 0;
        for (Iterator it = clientesCollection.iterator(); it.hasNext(); i++) {
            Cliente clienteIt = (Cliente) it.next();
            
            resultadoTabelaClienteJTable.setValueAt(clienteIt.getNome(),i,0);
            resultadoTabelaClienteJTable.setValueAt(clienteIt.getCpf(),i,1);
            resultadoTabelaClienteJTable.setValueAt(clienteIt.getId(),i,2);
        }
    }//GEN-LAST:event_consultaClienteJButtonActionPerformed

    private void salvarClienteJButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_salvarClienteJButtonActionPerformed
        Cliente cliente = new Cliente();

        cliente = getConteudoConsultaFormCliente();

        if ( cliente.getId() != -1  )
            locadora.manipularCliente(cliente, Locadora.alterar);
        else
            locadora.manipularCliente(cliente, Locadora.inserir);
    }//GEN-LAST:event_salvarClienteJButtonActionPerformed

    private void limparFormConsultaClienteJButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_limparFormConsultaClienteJButtonActionPerformed
        limpaFormConsultaCliente();
    }//GEN-LAST:event_limparFormConsultaClienteJButtonActionPerformed

    private void salvarAluguelJButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_salvarAluguelJButtonActionPerformed
        Aluguel aluguel = getConteudoConsultaFormAluguel();
        
        locadora.incluirAluguel(aluguel);
    }//GEN-LAST:event_salvarAluguelJButtonActionPerformed

    private void consultaAluguelButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_consultaAluguelButtonActionPerformed
        Aluguel aluguel = getConteudoConsultaFormAluguel();
        ArrayList<Aluguel> alugueisCollection = null;
        int i = 0;
        
        limpaJTable(resultadoTabelaAluguelJTable);
        resultadoTabelaAluguelJTable.setEnabled(true);

        alugueisCollection = (ArrayList<Aluguel>) locadora.consultarAlugueis(aluguel);
        alugueisHashResultado = new HashMap<Integer, Aluguel>();
        for (Iterator<Aluguel> it = alugueisCollection.iterator(); it.hasNext(); i++) {
            aluguel = it.next();
            alugueisHashResultado.put(i, aluguel);
        }

        i = 0;
        for (Iterator it = alugueisCollection.iterator(); it.hasNext(); i++) {
            Aluguel aluguelIt = (Aluguel) it.next();
            
            resultadoTabelaAluguelJTable.setValueAt(aluguelIt.getCodigoCliente(),i,0);
            resultadoTabelaAluguelJTable.setValueAt(aluguelIt.getId(),i,1);
            resultadoTabelaAluguelJTable.setValueAt(aluguelIt.getDataAluguel(),i,2);
            resultadoTabelaAluguelJTable.setValueAt(aluguelIt.getDataDevolucao(),i,3);
            resultadoTabelaAluguelJTable.setValueAt(aluguelIt.getCodigo(),i,4);
        }
}//GEN-LAST:event_consultaAluguelButtonActionPerformed

    private void excluirFilmesJButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_excluirFilmesJButtonActionPerformed
        int [] rows = resultadoTabelaFilmeJTable.getSelectedRows();
        int numRows = rows.length;

        for ( int i = 0 ; i < numRows ; i++ ){
            if ( filmesHashResultado.containsKey(rows[i]) ){
                locadora.manipularFilme(filmesHashResultado.get(rows[i]),Locadora.deletar);
                filmesHashResultado.remove(rows[i]);
                limpaRowJTable(resultadoTabelaFilmeJTable, rows[i]);
            }
        }
    }//GEN-LAST:event_excluirFilmesJButtonActionPerformed

    private void excluirClientesJButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_excluirClientesJButtonActionPerformed
        int [] rows = resultadoTabelaClienteJTable.getSelectedRows();
        int numRows = rows.length;

        for ( int i = 0 ; i < numRows ; i++ ){
            if ( clientesHashResultado.containsKey(rows[i]) ){
                locadora.manipularCliente(clientesHashResultado.get(rows[i]),Locadora.deletar);
                clientesHashResultado.remove(rows[i]);
                limpaRowJTable(resultadoTabelaClienteJTable, rows[i]);
            }
        }
    }//GEN-LAST:event_excluirClientesJButtonActionPerformed

    private void encerrarAlugueisJButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_encerrarAlugueisJButtonActionPerformed
        int [] rows = resultadoTabelaAluguelJTable.getSelectedRows();
        int numRows = rows.length;

        for ( int i = 0 ; i < numRows ; i++ ){
            if ( alugueisHashResultado.containsKey(rows[i]) ){
                locadora.encerrarAluguel(getConteudoConsultaFormAluguel());
                alugueisHashResultado.remove(rows[i]);
                limpaRowJTable(resultadoTabelaAluguelJTable, rows[i]);
            }
        }
}//GEN-LAST:event_encerrarAlugueisJButtonActionPerformed

    // Variables declaration - do not modify//GEN-BEGIN:variables
    private javax.swing.JPanel alugueisJPanel;
    private javax.swing.JTextField anoJTextField;
    private javax.swing.JTabbedPane atoresJTabbedPane;
    private javax.swing.JTextField bairroClienteJTextField;
    private javax.swing.JTextField cepClienteJTextField;
    private javax.swing.JTextField cidadeClienteJTextField;
    private javax.swing.JPanel clientesJPanel;
    private javax.swing.JTextField codigoClienteAluguelJTextField;
    private javax.swing.JTextField codigoCopiaFilmeJTextField;
    private javax.swing.JButton consultaAluguelButton;
    private javax.swing.JButton consultaClienteJButton;
    private javax.swing.JButton consultarFilmeJButton;
    private javax.swing.JTextField cpfClienteJTextField;
    private javax.swing.JTextField dataAluguelJTextField;
    private javax.swing.JTextField dataDevolucaoJTextField;
    private javax.swing.JTextField duracaoJTextField;
    private javax.swing.JButton encerrarAlugueisJButton;
    private javax.swing.JTextField enderecoClienteJTextField;
    private javax.swing.JRadioButton espanholJRadioButton;
    private javax.swing.JButton excluirClientesJButton;
    private javax.swing.JButton excluirFilmesJButton;
    private javax.swing.JPanel filmesJPanel;
    private javax.swing.JPanel formAlugueisJPanel;
    private javax.swing.JPanel formClientesJPanel;
    private javax.swing.JPanel formFilmesJPanel;
    private javax.swing.JCheckBox generoAcaoJCheckBox;
    private javax.swing.JCheckBox generoAventuraJCheckBox;
    private javax.swing.JCheckBox generoComediaJCheckBox;
    private javax.swing.JCheckBox generoDramaJCheckBox;
    private javax.swing.JCheckBox generoFiccaoJCheckBox;
    private javax.swing.JCheckBox generoRomanceJCheckBox;
    private javax.swing.JCheckBox generoSuspenseJCheckBox;
    private javax.swing.JCheckBox generoTerrorJCheckBox;
    private javax.swing.JTabbedPane geraljTabbedPane;
    private javax.swing.JTextField idClienteJTextField;
    private javax.swing.JTextField idFilmeAluguelJTextField;
    private javax.swing.JTextField idFilmeJTextField;
    private javax.swing.ButtonGroup idiomaButtonGroup;
    private javax.swing.JRadioButton inglesJRadioButton;
    private javax.swing.JLabel jLabel1;
    private javax.swing.JLabel jLabel10;
    private javax.swing.JLabel jLabel11;
    private javax.swing.JLabel jLabel12;
    private javax.swing.JLabel jLabel13;
    private javax.swing.JLabel jLabel14;
    private javax.swing.JLabel jLabel15;
    private javax.swing.JLabel jLabel16;
    private javax.swing.JLabel jLabel17;
    private javax.swing.JLabel jLabel18;
    private javax.swing.JLabel jLabel19;
    private javax.swing.JLabel jLabel2;
    private javax.swing.JLabel jLabel20;
    private javax.swing.JLabel jLabel21;
    private javax.swing.JLabel jLabel22;
    private javax.swing.JLabel jLabel23;
    private javax.swing.JLabel jLabel24;
    private javax.swing.JLabel jLabel25;
    private javax.swing.JLabel jLabel26;
    private javax.swing.JLabel jLabel27;
    private javax.swing.JLabel jLabel28;
    private javax.swing.JLabel jLabel29;
    private javax.swing.JLabel jLabel3;
    private javax.swing.JLabel jLabel30;
    private javax.swing.JLabel jLabel31;
    private javax.swing.JLabel jLabel32;
    private javax.swing.JLabel jLabel34;
    private javax.swing.JLabel jLabel35;
    private javax.swing.JLabel jLabel36;
    private javax.swing.JLabel jLabel37;
    private javax.swing.JLabel jLabel38;
    private javax.swing.JLabel jLabel4;
    private javax.swing.JLabel jLabel5;
    private javax.swing.JLabel jLabel6;
    private javax.swing.JLabel jLabel7;
    private javax.swing.JLabel jLabel8;
    private javax.swing.JLabel jLabel9;
    private javax.swing.JMenu jMenu1;
    private javax.swing.JMenuItem jMenuItem1;
    private javax.swing.JPanel jPanel1;
    private javax.swing.JPanel jPanel2;
    private javax.swing.JPanel jPanel3;
    private javax.swing.JPanel jPanel4;
    private javax.swing.JPanel jPanel5;
    private javax.swing.JPanel jPanel6;
    private javax.swing.JPanel jPanel7;
    private javax.swing.JPanel jPanel8;
    private javax.swing.JScrollPane jScrollPane1;
    private javax.swing.JScrollPane jScrollPane2;
    private javax.swing.JScrollPane jScrollPane3;
    private javax.swing.JCheckBox legendaEspanholJCheckBox;
    private javax.swing.JCheckBox legendaInglesJCheckBox;
    private javax.swing.JCheckBox legendaOutraJCheckBox;
    private javax.swing.JCheckBox legendaPortuguesJCheckBox;
    private javax.swing.JButton limparFormConsultaClienteJButton;
    private javax.swing.JButton limparFormConsultaFilmeJButton;
    private javax.swing.JPanel mainPanel;
    private javax.swing.JMenuBar menuBar;
    private javax.swing.JTextField nascimentoClienteJTextField;
    private javax.swing.JTextField nomeAtor1JTextField;
    private javax.swing.JTextField nomeAtor2JTextField;
    private javax.swing.JTextField nomeAtor3JTextField;
    private javax.swing.JTextField nomeAtor4JTextField;
    private javax.swing.JTextField nomeClienteJTextField;
    private javax.swing.JTextField nomeJTextField;
    private javax.swing.JTextField nomeOriginalJTextField;
    private javax.swing.JRadioButton outroJRadioButton;
    private javax.swing.JTextField papel1Ator1JTextField;
    private javax.swing.JTextField papel1Ator2JTextField;
    private javax.swing.JTextField papel1Ator3JTextField;
    private javax.swing.JTextField papel1Ator4JTextField;
    private javax.swing.JTextField papel2Ator1JTextField;
    private javax.swing.JTextField papel2Ator2JTextField;
    private javax.swing.JTextField papel2Ator3JTextField;
    private javax.swing.JTextField papel2Ator4JTextField;
    private javax.swing.JTextField papel3Ator1JTextField;
    private javax.swing.JTextField papel3Ator2JTextField;
    private javax.swing.JTextField papel3Ator3JTextField;
    private javax.swing.JTextField papel3Ator4JTextField;
    private javax.swing.JRadioButton portuguesJRadioButton;
    private javax.swing.JProgressBar progressBar;
    private javax.swing.JTextField quantidadeJTextField;
    private javax.swing.JPanel resultadoConsultaClientesJPanel;
    private javax.swing.JPanel resultadoConsultaFilmeJPanel;
    private javax.swing.JTable resultadoTabelaAluguelJTable;
    private javax.swing.JTable resultadoTabelaClienteJTable;
    private javax.swing.JTable resultadoTabelaFilmeJTable;
    private javax.swing.JButton salvarAluguelJButton;
    private javax.swing.JButton salvarClienteJButton;
    private javax.swing.JButton salvarFilmeJButton;
    private javax.swing.JLabel statusAnimationLabel;
    private javax.swing.JLabel statusMessageLabel;
    private javax.swing.JPanel statusPanel;
    private javax.swing.JTextField telefoneClienteJTextField;
    private javax.swing.JCheckBox titularClienteJCheckBox;
    // End of variables declaration//GEN-END:variables

    private final Timer messageTimer;
    private final Timer busyIconTimer;
    private final Icon idleIcon;
    private final Icon[] busyIcons = new Icon[15];
    private int busyIconIndex = 0;

    private JDialog aboutBox;

    private class RowListenerFilmes implements ListSelectionListener {
        public void valueChanged(ListSelectionEvent event) {
            int [] rows = resultadoTabelaFilmeJTable.getSelectedRows();
            int numRows = rows.length;
            
            if ( numRows == 1 ){
                int row = resultadoTabelaFilmeJTable.getSelectionModel().getLeadSelectionIndex();

                limpaFormConsultaFilme();

                if ( filmesHashResultado.containsKey(row) )
                    setConteudoConsultaFormFilme(filmesHashResultado.get(row));
            }
           
        }
    }

    private class RowListenerClientes implements ListSelectionListener {
        public void valueChanged(ListSelectionEvent event) {
            int [] rows = resultadoTabelaClienteJTable.getSelectedRows();
            int numRows = rows.length;

            if ( numRows == 1 ){
                int row = resultadoTabelaClienteJTable.getSelectionModel().getLeadSelectionIndex();

                limpaFormConsultaCliente();

                if ( clientesHashResultado.containsKey(row) )
                    setConteudoConsultaFormCliente(clientesHashResultado.get(row));
            }

        }
    }

    private class RowListenerAlugueis implements ListSelectionListener {
        public void valueChanged(ListSelectionEvent event) {
            int [] rows = resultadoTabelaAluguelJTable.getSelectedRows();
            int numRows = rows.length;

            if ( numRows == 1 ){
                int row = resultadoTabelaAluguelJTable.getSelectionModel().getLeadSelectionIndex();

                limpaFormConsultaAluguel();

                if ( alugueisHashResultado.containsKey(row) )
                    setConteudoConsultaFormAluguel(alugueisHashResultado.get(row));
            }

        }
    }


    private Filme getConteudoConsultaFormFilme(){
        Filme filme = new Filme();
        filme.setNome(nomeJTextField.getText());
        filme.setNomeOriginal(nomeOriginalJTextField.getText());
        filme.setAno(anoJTextField.getText());
        filme.setDuracao(duracaoJTextField.getText());
        filme.setQuantidade(quantidadeJTextField.getText());
        
        String idString = idFilmeJTextField.getText();
        if ( idString != null && !idString.equals(""))
            filme.setId(Integer.parseInt(idString));
        else
            filme.setId(-1);

        
        //IDIOMA - BEGIN
        if ( inglesJRadioButton.isSelected() )
            filme.setIdioma("ingles");
        else if ( espanholJRadioButton.isSelected() )
            filme.setIdioma("espanhol");
        else if ( portuguesJRadioButton.isSelected() )
            filme.setIdioma("portugues");
        else if ( outroJRadioButton.isSelected() )
            filme.setIdioma("outro");
        //IDIOMA - END


        //LEGANDAS - BEGIN
        if ( legendaInglesJCheckBox.isSelected() )
            filme.getLegendas().add("ingles");
        if ( legendaEspanholJCheckBox.isSelected() )
            filme.getLegendas().add("espanhol");
        if ( legendaPortuguesJCheckBox.isSelected() )
            filme.getLegendas().add("portugues");
        if ( legendaOutraJCheckBox.isSelected() )
            filme.getLegendas().add("outro");
        //LEGANDAS - END


        //GENEROS - BEGIN
        if ( generoAcaoJCheckBox.isSelected() )
            filme.getGenero().add("acao");
        if ( generoDramaJCheckBox.isSelected() )
            filme.getGenero().add("drama");
        if ( generoFiccaoJCheckBox.isSelected() )
            filme.getGenero().add("ficcao cientifica");
        if ( generoAventuraJCheckBox.isSelected() )
            filme.getGenero().add("aventura");
        if ( generoComediaJCheckBox.isSelected() )
            filme.getGenero().add("comedia");
        if ( generoRomanceJCheckBox.isSelected() )
            filme.getGenero().add("romance");
        if ( generoSuspenseJCheckBox.isSelected() )
            filme.getGenero().add("suspense");
        if ( generoTerrorJCheckBox.isSelected() )
            filme.getGenero().add("terror");
        //GENEROS - END


        //ATORES - BEGIN
        if ( !nomeAtor1JTextField.getText().isEmpty()){
            Ator ator = new Ator(nomeAtor1JTextField.getText());
            ArrayList<String> papel = new ArrayList<String>();

            if ( !papel1Ator1JTextField.getText().isEmpty() )
                papel.add(papel1Ator1JTextField.getText());
            if ( !papel2Ator1JTextField.getText().isEmpty() )
                papel.add(papel2Ator1JTextField.getText());
            if ( !papel3Ator1JTextField.getText().isEmpty() )
                papel.add(papel3Ator1JTextField.getText());

            ator.setPapel(papel);
            filme.getAtores().add(ator);
        }

        if ( !nomeAtor2JTextField.getText().isEmpty()){
            Ator ator = new Ator(nomeAtor2JTextField.getText());
            ArrayList<String> papel = new ArrayList<String>();

            if ( !papel1Ator2JTextField.getText().isEmpty() )
                papel.add(papel1Ator2JTextField.getText());
            if ( !papel2Ator2JTextField.getText().isEmpty() )
                papel.add(papel2Ator2JTextField.getText());
            if ( !papel3Ator2JTextField.getText().isEmpty() )
                papel.add(papel3Ator2JTextField.getText());

            ator.setPapel(papel);
            filme.getAtores().add(ator);
        }

        if ( !nomeAtor3JTextField.getText().isEmpty()){
            Ator ator = new Ator(nomeAtor3JTextField.getText());
            ArrayList<String> papel = new ArrayList<String>();

            if ( !papel1Ator3JTextField.getText().isEmpty() )
                papel.add(papel1Ator3JTextField.getText());
            if ( !papel2Ator3JTextField.getText().isEmpty() )
                papel.add(papel2Ator3JTextField.getText());
            if ( !papel3Ator3JTextField.getText().isEmpty() )
                papel.add(papel3Ator3JTextField.getText());

            ator.setPapel(papel);
            filme.getAtores().add(ator);
        }

        if ( !nomeAtor4JTextField.getText().isEmpty()){
            Ator ator = new Ator(nomeAtor4JTextField.getText());
            ArrayList<String> papel = new ArrayList<String>();

            if ( !papel1Ator4JTextField.getText().isEmpty() )
                papel.add(papel1Ator4JTextField.getText());
            if ( !papel2Ator4JTextField.getText().isEmpty() )
                papel.add(papel2Ator4JTextField.getText());
            if ( !papel3Ator4JTextField.getText().isEmpty() )
                papel.add(papel3Ator4JTextField.getText());

            ator.setPapel(papel);
            filme.getAtores().add(ator);
        }
        //ATORES - END

        return filme;
    }

        private void setConteudoConsultaFormFilme(Filme filme){
        nomeJTextField.setText(filme.getNome());
        nomeOriginalJTextField.setText(filme.getNomeOriginal());
        anoJTextField.setText(filme.getAno());
        duracaoJTextField.setText(filme.getDuracao());
        quantidadeJTextField.setText(filme.getQuantidade());
        idFilmeJTextField.setText(Integer.toString(filme.getId()));


        //IDIOMA - BEGIN
        String idioma = filme.getIdioma();
        if (idioma != null){
            if ( idioma.equalsIgnoreCase("ingles") )
                inglesJRadioButton.setSelected(true);
            else if( idioma.equalsIgnoreCase("espanhol") )
                espanholJRadioButton.setSelected(true);
            else if( idioma.equalsIgnoreCase("portugues") )
                portuguesJRadioButton.setSelected(true);
            else if( idioma.equalsIgnoreCase("outro") )
                outroJRadioButton.setSelected(true);
        }
        //IDIOMA - END


        //LEGANDAS - BEGIN
        ArrayList<String> legendas = filme.getLegendas();

        for (Iterator<String> it = legendas.iterator(); it.hasNext();) {
            String legenda = it.next();

            if ( legenda.equalsIgnoreCase("ingles") )
                legendaInglesJCheckBox.setSelected(true);
            else if ( legenda.equalsIgnoreCase("espanhol") )
                legendaEspanholJCheckBox.setSelected(true);
            else if ( legenda.equalsIgnoreCase("portugues") )
                legendaPortuguesJCheckBox.setSelected(true);
            else if ( legenda.equalsIgnoreCase("outro") )
                legendaOutraJCheckBox.setSelected(true);
        }
        //LEGANDAS - END

        
        //GENEROS - BEGIN
        ArrayList<String> generos = filme.getGenero();

        for (Iterator<String> it = generos.iterator(); it.hasNext();) {
            String genero = it.next();

            if ( genero.equalsIgnoreCase("acao") )
                generoAcaoJCheckBox.setSelected(true);
            else if ( genero.equalsIgnoreCase("drama") )
                generoDramaJCheckBox.setSelected(true);
            else if ( genero.equalsIgnoreCase("ficcao cientifica") )
                generoFiccaoJCheckBox.setSelected(true);
            else if ( genero.equalsIgnoreCase("aventura") )
                generoAventuraJCheckBox.setSelected(true);
            else if ( genero.equalsIgnoreCase("comedia") )
                generoComediaJCheckBox.setSelected(true);
            else if ( genero.equalsIgnoreCase("romance") )
                generoRomanceJCheckBox.setSelected(true);
            else if ( genero.equalsIgnoreCase("suspense") )
                generoSuspenseJCheckBox.setSelected(true);
            else if ( genero.equalsIgnoreCase("terror") )
                generoTerrorJCheckBox.setSelected(true);
        }
        //GENEROS - END


        //ATORES - BEGIN
        ArrayList<Ator> atores = filme.getAtores();
        int indexPapel;
        Iterator<Ator> it = atores.iterator();

        if ( it.hasNext() ){
            Ator ator = it.next();
            ArrayList<String> papeis = ator.getPapel();

            nomeAtor1JTextField.setText(ator.getNome());

            indexPapel = 1;
            for (Iterator<String> it2 = papeis.iterator(); it2.hasNext(); indexPapel++) {
                String papel = it2.next();

                if ( indexPapel==1 )
                    papel1Ator1JTextField.setText(papel);
                else if ( indexPapel==2 )
                    papel2Ator1JTextField.setText(papel);
                else
                    papel3Ator1JTextField.setText(papel);
            }
        }

        if ( it.hasNext() ){
            Ator ator = it.next();
            ArrayList<String> papeis = ator.getPapel();

            nomeAtor2JTextField.setText(ator.getNome());

            indexPapel = 1;
            for (Iterator<String> it2 = papeis.iterator(); it2.hasNext(); indexPapel++) {
                String papel = it2.next();

                if ( indexPapel==1 )
                    papel1Ator2JTextField.setText(papel);
                else if ( indexPapel==2 )
                    papel2Ator2JTextField.setText(papel);
                else
                    papel3Ator2JTextField.setText(papel);
            }
        }

        if ( it.hasNext() ){
            Ator ator = it.next();
            ArrayList<String> papeis = ator.getPapel();

            nomeAtor3JTextField.setText(ator.getNome());

            indexPapel = 1;
            for (Iterator<String> it2 = papeis.iterator(); it2.hasNext(); indexPapel++) {
                String papel = it2.next();

                if ( indexPapel==1 )
                    papel1Ator3JTextField.setText(papel);
                else if ( indexPapel==2 )
                    papel2Ator3JTextField.setText(papel);
                else
                    papel3Ator3JTextField.setText(papel);
            }
        }

        if ( it.hasNext() ){
            Ator ator = it.next();
            ArrayList<String> papeis = ator.getPapel();

            nomeAtor4JTextField.setText(ator.getNome());

            indexPapel = 1;
            for (Iterator<String> it2 = papeis.iterator(); it2.hasNext(); indexPapel++) {
                String papel = it2.next();

                if ( indexPapel==1 )
                    papel1Ator4JTextField.setText(papel);
                else if ( indexPapel==2 )
                    papel2Ator4JTextField.setText(papel);
                else
                    papel3Ator4JTextField.setText(papel);
            }
        }
        //ATORES - END
    }

    private void limpaFormConsultaFilme(){
        nomeJTextField.setText(null);
        nomeOriginalJTextField.setText(null);
        anoJTextField.setText(null);
        quantidadeJTextField.setText(null);
        idFilmeJTextField.setText(null);
        duracaoJTextField.setText(null);
        idiomaButtonGroup.clearSelection();

        legendaEspanholJCheckBox.setSelected(false);
        legendaInglesJCheckBox.setSelected(false);
        legendaOutraJCheckBox.setSelected(false);
        legendaPortuguesJCheckBox.setSelected(false);

        generoAcaoJCheckBox.setSelected(false);
        generoAventuraJCheckBox.setSelected(false);
        generoComediaJCheckBox.setSelected(false);
        generoDramaJCheckBox.setSelected(false);
        generoFiccaoJCheckBox.setSelected(false);
        generoRomanceJCheckBox.setSelected(false);
        generoSuspenseJCheckBox.setSelected(false);
        generoTerrorJCheckBox.setSelected(false);

        nomeAtor1JTextField.setText(null);
        nomeAtor2JTextField.setText(null);
        nomeAtor3JTextField.setText(null);
        nomeAtor4JTextField.setText(null);

        papel1Ator1JTextField.setText(null);
        papel2Ator1JTextField.setText(null);
        papel3Ator1JTextField.setText(null);

        papel1Ator2JTextField.setText(null);
        papel2Ator2JTextField.setText(null);
        papel3Ator2JTextField.setText(null);

        papel1Ator3JTextField.setText(null);
        papel2Ator3JTextField.setText(null);
        papel3Ator3JTextField.setText(null);

        papel1Ator4JTextField.setText(null);
        papel2Ator4JTextField.setText(null);
        papel3Ator4JTextField.setText(null);

        return;
    }

    private Cliente getConteudoConsultaFormCliente(){
        Cliente cliente = new Cliente();

        cliente.setNome(nomeClienteJTextField.getText());
        cliente.setTelefone(telefoneClienteJTextField.getText());
        cliente.setNascimento(nascimentoClienteJTextField.getText());
        cliente.setCpf(cpfClienteJTextField.getText());
        cliente.setEndereco(enderecoClienteJTextField.getText());
        cliente.setCep(cepClienteJTextField.getText());
        cliente.setCidade(cidadeClienteJTextField.getText());
        cliente.setBairro(bairroClienteJTextField.getText());
        cliente.setTitular(titularClienteJCheckBox.isSelected());

        String idString = idClienteJTextField.getText();
        if ( idString != null && !idString.equals(""))
            cliente.setId(Integer.parseInt(idString));
        else
            cliente.setId(-1);

        return cliente;
    }

    private void setConteudoConsultaFormCliente(Cliente cliente){
        nomeClienteJTextField.setText(cliente.getNome());
        telefoneClienteJTextField.setText(cliente.getTelefone());
        nascimentoClienteJTextField.setText(cliente.getNascimento());
        cpfClienteJTextField.setText(cliente.getCpf());
        enderecoClienteJTextField.setText(cliente.getEndereco());
        cepClienteJTextField.setText(cliente.getCep());
        cidadeClienteJTextField.setText(cliente.getCidade());
        bairroClienteJTextField.setText(cliente.getBairro());
        idClienteJTextField.setText(Integer.toString(cliente.getId()));


        if ( cliente.getCpf() != null )
            titularClienteJCheckBox.setSelected(true);
    }

    private void limpaFormConsultaCliente(){
        nomeClienteJTextField.setText(null);
        telefoneClienteJTextField.setText(null);
        nascimentoClienteJTextField.setText(null);
        cpfClienteJTextField.setText(null);
        enderecoClienteJTextField.setText(null);
        cepClienteJTextField.setText(null);
        cidadeClienteJTextField.setText(null);
        bairroClienteJTextField.setText(null);
        idClienteJTextField.setText(null);
        titularClienteJCheckBox.setSelected(false);
    }

    private Aluguel getConteudoConsultaFormAluguel(){
        Aluguel aluguel = new Aluguel();

        aluguel.setCodigoCliente(codigoClienteAluguelJTextField.getText());
        aluguel.setDataAluguel(dataAluguelJTextField.getText());
        aluguel.setDataDevolucao(dataDevolucaoJTextField.getText());
        aluguel.setCodigo(codigoCopiaFilmeJTextField.getText());
        aluguel.setId(idFilmeAluguelJTextField.getText());

        return aluguel;
    }

    private void setConteudoConsultaFormAluguel(Aluguel aluguel){
        codigoClienteAluguelJTextField.setText(aluguel.getCodigoCliente());
        dataAluguelJTextField.setText(aluguel.getDataAluguel());
        dataDevolucaoJTextField.setText(aluguel.getDataDevolucao());
        idFilmeAluguelJTextField.setText(aluguel.getId());
        codigoCopiaFilmeJTextField.setText(aluguel.getCodigo());
    }

    private void limpaFormConsultaAluguel(){
        codigoClienteAluguelJTextField.setText(null);
        dataAluguelJTextField.setText(null);
        dataDevolucaoJTextField.setText(null);
        idFilmeAluguelJTextField.setText(null);
        codigoCopiaFilmeJTextField.setText(null);
     }

    private void limpaJTable(JTable tabela){

        for ( int i = 0 ; i < tabela.getRowCount() ; i++ )
            for ( int j = 0 ; j < tabela.getColumnCount() ; j++ )
                tabela.setValueAt(null, i, j);

    }

        private void limpaRowJTable(JTable tabela,int row){

        for ( int j = 0 ; j < tabela.getColumnCount() ; j++ )
            tabela.setValueAt(null, row, j);
    }

}
